structure MathExtra = struct
    fun sign num =
        if num > 0
        then 1
        else
            if num < 0
            then ~1
            else 0;
end
